package com.yeyks.commonReference.append.wxPay.config;

import com.github.binarywang.wxpay.service.WxPayService;
import com.yeyks.common.em.pay.PayAttach;
import com.yeyks.common.em.pay.PayTypeEnum;
import com.yeyks.common.exception.ServiceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WeChatYyksConfigUtil {

    @Autowired
    private WeChatYyksBaseConfigUtil weChatYyksBaseConfigUtil;
    @Autowired
    private WeChatYyksVipConfigUtil WeChatYyksVipConfigUtil;



    public WxPayService getWxPayService(String orderType,String payType) {
        if(PayAttach.MEMBER_CARD_ENABLE_ORDER.desc().equals(orderType)){
            return WeChatYyksVipConfigUtil.getWxPayService(payType);
        }
        return weChatYyksBaseConfigUtil.getWxPayService(payType);
    }

}
